// 
//  Store.m
//  iFoundIt
//
//  Created by Navid Shariat on 24/05/10.
//  Copyright 2010 QUT. All rights reserved.
//

#import "Store.h"

@implementation Store 

@synthesize shopName,storeId, longtitude,latitude, seachKeywords, distance;

-(void) dealloc{
	[shopName release ];
	[seachKeywords release];
	[super dealloc];
}


- (CLLocationCoordinate2D) getCoordinate{
	CLLocationCoordinate2D coordinate;
	coordinate.latitude=[self latitude];
	coordinate.longitude=[self longtitude];
	return coordinate;
}

- (CLLocation*) getLocation{
	CLLocation * location= [[CLLocation alloc] initWithLatitude:[self latitude] longitude: [self longtitude]];
	return location;
}

-(double) getDistanceFrom: (CLLocation *) fromLocation{
	CLLocation * location=[self getLocation];	
	double dist=[location getDistanceFrom:fromLocation];
	[location release];
	return dist;
}
@end
